#include <stdio.h>
#include <unistd.h>
#include <signal.h>

volatile int g_val = 1;

void sigcallback(int signo)
{
    g_val = 0;
    printf("signo:%d %d\n", signo, g_val);
}

int main()
{
    //signal(2, sigcallback);

    while(g_val) //while(1)
    {
        //printf("g_val:%d\n", g_val);
        //sleep(1);
    }

    //printf("g_val:%d\n", g_val);
    return 0;
}
